home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14435 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ns.mad.servicom.es!news
  2. From: ores@mad.servicom.es (Orestes Sanchez)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: What is : void class::method(TYPE* type) throw()
  5. Date: Sat, 30 Mar 1996 17:43:07 GMT
  6. Organization: SERVICOM
  7. Message-ID: <4jjsdm$q00@ns.mad.servicom.es>
  8. References: <4j5jfc$hk3@doc.zippo.com>
  9. NNTP-Posting-Host: ppp_mad_151.inf.servicom.es
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Gilad Brand wrote:
  13.  
  14. >I read an article in the "C++ Report" which carried the name: "C++ Exception -
  15. >Handling in Multithreaded Programs" / by Sean Leary. 
  16. >In the article I saw some examples of code which syntax was unfamiliar to me.
  17. >The formal declaration of a method was written like this:
  18.  
  19. >void EHThread::terminate(EHThread* self) throw()
  20. >{
  21. >    ...
  22. >}
  23.  
  24. >This syntax returned in other places in the article.
  25. >I wonder if there is anyone who is familiar with this syntax, and can tell
  26. >me what is its meaning ?
  27.  
  28. void EHThread::terminate(EHThread* self) throw()
  29. I think your problem is with the "throw" keyword. It is a keyword in
  30. C++ and it allows exceptions to be "thrown" in that function.
  31. Exceptions are a powerful technic to handle exceptional situations in
  32. your code. They are more or less like a hardware exception, but with
  33. the hability that a programmer can throw one.
  34. I recomend you a book on C++ such as "The Annotated C++ Reference
  35. Manual" of Margaret Ellis and Bjarne Stroupstroup.
  36.  
  37. Orestes
  38.  
  39. >Thanks,
  40.  
  41.  
  42.  
  43.